<?php echo $this->doctype() ?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>

        <?php echo $this->headMeta() ?>

        <?php echo $this->headTitle() ?>

        <link rel="shortcut icon" href="<?php echo $this->baseUrl() ?>/images/favicon.ico">

            <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
            <!--[if lt IE 9]>
              <script src="/js/html5shiv.js"></script>
              <script src="/js/respond.min.js"></script>
            <![endif]-->
            <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/style.css') ?>
            <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/blueimp-gallery.min.css') ?>
            <?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/bootstrap-image-gallery.min.css') ?>
            <?php $this->headLink()->appendStylesheet('', 'screen', true, array('id' => 'colorpage')) ?>


            <?php $this->headScript()->appendFile($this->baseUrl() . '/js/scripts.js'); ?>
            <?php $this->headScript()->appendFile($this->baseUrl() . '/js/jquery.scrollUp.min.js'); ?>
            

            <?php echo $this->headLink() ?>
    </head>
    <body class="gradiant">
        <div class="container">
            <div class="row clearfix" id="header">
                <div class="col-md-12 column" id="social">
                    <a href="/<?php echo $this->baseUrl() ?>" ><img class="visible-lg" src="<?php echo $this->baseUrl() ?>/images/logo.png" id="logo"></a>
                    <div id="socialText">Keep in touch </div>
                    <ul>
                        <li><a target="_blank" href="https://www.facebook.com/itiosd" class="facebook"></a></li>
                        <li><a target="_blank" href="#" class="google"></a></li>
                        <li><a target="_blank" href="https://twitter.com/itiosd" class="twitter"></a></li>
                        <li><a target="_blank" href="http://eg.linkedin.com/in/itiosd/" class="linkedin"></a></li>
                    </ul>
                    <div id="colorText" class="visible-lg">Change Color </div>
                    <ul id="color" class="visible-lg">
                        <li><a class="red" onClick="page_style('red');"></a></li>
                        <li><a class="blue" onClick="page_style('blue');"></a></li>
                        <li><a class="green" onClick="page_style('green');"></a></li>
                        <li><a class="yellow" onClick="page_style('yellow');"></a></li>
                    </ul>
                </div>
            </div>
            <div class="row clearfix" id="nav">
                <div class="col-md-12 column">

                    <?= $this->navigation()->menu()->setPartial("_menu.phtml")->render(); ?>
                    <?php if (empty($this->identity)) { ?>
                        <ul id="login" class="nav navbar-right hidden-xs">
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-user"></span> Login</a>
                                <ul class="dropdown-menu">
                                    <div class="row clearfix">
                                        <div class="col-md-11">
                                            <form role="form" id="loginForm" method="POST" action="<?= $this->baseUrl() ?>/user/login">
                                                <div id="loginError">

                                                </div>
                                                <div class="form-group">
                                                    <label for="email">Email address</label>
                                                    <?= $this->loginForm->loginEmail ?>
                                                </div>
                                                <div class="form-group">
                                                    <label for="password">Password</label>
                                                    <?= $this->loginForm->loginPassword ?>
                                                </div>

                                                <div class="checkbox">
                                                    <label>
                                                        <?= $this->loginForm->remember ?> Remember Me
                                                    </label>
                                                </div>
                                                <?= $this->loginForm->loginSubmit ?>
                                            </form>
                                        </div>
                                    </div>
                                </ul>
                            </li>

                        </ul>
                    <?php } else { ?>
                        <ul class="navbar-right">

                            <li id="menuWelcome">

                                <?php
                                if ($this->identity->image) {
                                    echo '<img class="img-circle" width="32px" height="32px" src="' . $this->baseUrl() . '/upload/profile/' . $this->identity->image . '" />';
                                } else {
                                    echo '<img class="img-circle" width="32px" height="32px" src="' . $this->baseUrl() . '/images/default_image.png" />';
                                }
                                ?>
                                <?php echo"Welcome <span class='label label-default'>" . $this->identity->firstName . " " . $this->identity->lastName . "</span>" ?>
                                <?php if ($this->identity->roleId < 2) { ?>

                                    <a href="<?= $this->baseUrl() ?>/administration"><span title="Control Panel" id="logoutIcon" class="glyphicon glyphicon-wrench"></span></a>

                                <?php } ?>
                                <a href="<?= $this->baseUrl() ?>/user/logout"><span title="Logout" id="logoutIcon" class="glyphicon glyphicon-off"></span></a>

                            </li>

                        </ul>
                        <?php
                    }

                    //opening tag in the partial view 
                    ?>
                    </ul>
                </div>
                <div id="login-content">

                </div>
            </div><!-- end nav -->

            <?php
            if (Zend_Controller_Front::getInstance()->getRequest()->getControllerName() != "index" && Zend_Controller_Front::getInstance()->getRequest()->getActionName() != "index") {
                ?>
                <?= $this->navigation()->breadcrumbs()->setPartial('_breadcrumbs.phtml')->setMinDepth(0)->render();
            } ?>

            <div class="fill">
<?= $this->layout()->content; ?>
</div>
            <div class="row clearfix" id="footer">
                <div class="col-md-12">

                    <footer>

                        <div id="footer-widgets">
                            <div class="footer-4-column">
                                <div id="text-2" class="widget"><h3 class="widget-title "><span class="glyphicon glyphicon-bookmark"></span> About us</h3>			<div class="textwidget">								<p class="form-control-static">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                                    </div>
                                </div><div id="blog_subscription-2" class="widget jetpack_subscription_widget"><h3 class="widget-title"><span class="glyphicon glyphicon-envelope"> </span> Newsletter</h3>
                                    <form action="" method="post" accept-charset="utf-8" id="subscribe-blog-blog_subscription-2">
                                        <p id="subscribe-text">Enter your email address to subscribe to our website and receive notifications of news by email.</p>
                                        <p id="subscribe-email"><input class="form-control" type="text" name="email" style="width: 95%; padding: 1px 2px"  placeholder="subscribe" id="subscribe-field"/></p>

                                        <p id="subscribe-submit">
                                            <input type="submit" class="btn btn-primary" id="subscribe" value="Subscribe"  />
                                        </p>
                                    </form>


                                </div>
                                <div id="nav_menu-2" class="widget widget_nav_menu">
                                    <h3 class="widget-title"><span class="glyphicon glyphicon-retweet"></span> Tweets</h3>
                                    <!-- Carousel ================================================== -->
                                    <div id="testimonial" class="carousel slide">
                                        <!-- Indicators -->         
                                        <div class="carousel-inner">           
                                            <div class="item active">
                                                <blockquote>
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
                                                    <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
                                                </blockquote>
                                            </div>
                                            <div class="item">
                                                <blockquote>
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
                                                    <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
                                                </blockquote>
                                            </div>  
                                            <div class="item">
                                                <blockquote>
                                                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
                                                    <small>Someone famous in <cite title="Source Title">Source Title</cite></small>
                                                </blockquote>
                                            </div>                                                                                   
                                        </div> 
                                        <div class="carousel-controls">
                                            <a class="carousel-control left" href="#testimonial" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
                                            <a class="carousel-control right" href="#testimonial" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
                                        </div>               

                                    </div><!-- End Carousel --> 
                                </div>
                                <div class="clearfix"></div>
                            </div><!-- close .width-container -->
                        </div><!-- close #footer-widgets -->

                        <div class="width-container">

                            <div id="copyright" class="text-center">&copy; <?php echo @date("Y") ?> All Rights Reserved.</div>		
                            <div class="clearfix"></div>
                        </div><!-- close .width-container -->
                    </footer>

                </div>
            </div>
        </div>
<?php $this->headScript()->captureStart("PREPEND") ?>
        var baseUrl = "<?php echo $this->baseUrl() ?>";
        var originalModule =  "<?php echo Zend_Controller_Front::getInstance()->getRequest()->getModuleName() ?>";
        var originalController =  "<?php echo Zend_Controller_Front::getInstance()->getRequest()->getControllerName() ?>";
        <?php $this->headScript()->captureEnd() ?>
<?php echo $this->headScript() ?>   
    </body>
</html>